package com.example.api.web;

import com.example.api.domain.Test;
import com.example.api.repository.TestRepository;
import com.example.api.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhangyy
 * @Email: zhang10092009@hotmail.com
 * @Date: 2020/12/10 16:59
 * @Version: v1.0
 * @Modified：
 * @Description:
 */
@RestController
@RequestMapping("/")
public class TestController {
    @Autowired
    private TestRepository testRepository;

    @GetMapping("/")
    public Object save(){
//        new Test("12");
        return testRepository.save(new Test("12"));
    }
}
